//-------------------------------------------------------------------
//	Copyright (c) 2010-2012 Zhirnov Andrey
//	This file is part of the "UXGEN" project.
//	See copyright notice in "Engine.h".
//-------------------------------------------------------------------

#ifndef _UX_PARSER_INTERFACE_H
#define _UX_PARSER_INTERFACE_H

#include "ConfigTypes.h"

namespace Engine
{
namespace Parsers
{

	//
	// Parser Interface
	//

	class _EXPORT_ IParser : public CEngBaseObject
	{
	protected:
		string_array_t	_aLog;

	public:
		virtual ~IParser() {}

		virtual bool ParseFile(IFilePtr pFile, config_node_t pNode, uint uSize = 0) = 0;
		virtual bool Save(IFilePtr pFile, config_const_node_t pNode) = 0;
		virtual void SetDirectories(const string_array_t &aDir) = 0;
		virtual bool IsSupported(const char *pFileExt) = 0;

		void  ClearLog()						{ _aLog.Clear(); }
		const string_array_t & GetLog() const	{ return _aLog; }
	};

//-------------------------------------------------------------------

}	// Parsers
}	// Engine

#endif	// _UX_PARSER_INTERFACE_H